3.329 \(\int \frac{1}{\sqrt{a+b \tan ^2(e+f x)}} \, dx\)

Optimal. Leaf size=46 \[ \frac{\tan ^{-1}\left (\frac{\sqrt{a-b} \tan (e+f x)}{\sqrt{a+b \tan ^2(e+f x)}}\right )}{f \sqrt{a-b}} \]

[Out]

ArcTan[(Sqrt[a - b]*Tan[e + f*x])/Sqrt[a + b*Tan[e + f*x]^2]]/(Sqrt[a - b]*f)

________________________________________________________________________________________

Rubi [A]  time = 0.0307983, antiderivative size = 46, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 16, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.188, Rules used = {3661, 377, 203} \[ \frac{\tan ^{-1}\left (\frac{\sqrt{a-b} \tan (e+f x)}{\sqrt{a+b \tan ^2(e+f x)}}\right )}{f \sqrt{a-b}} \]

Antiderivative was successfully verified.

[In]

Int[1/Sqrt[a + b*Tan[e + f*x]^2],x]

[Out]

ArcTan[(Sqrt[a - b]*Tan[e + f*x])/Sqrt[a + b*Tan[e + f*x]^2]]/(Sqrt[a - b]*f)

Rule 3661

Int[((a_) + (b_.)*((c_.)*tan[(e_.) + (f_.)*(x_)])^(n_))^(p_), x_Symbol] :> With[{ff = FreeFactors[Tan[e + f*x]
, x]}, Dist[(c*ff)/f, Subst[Int[(a + b*(ff*x)^n)^p/(c^2 + ff^2*x^2), x], x, (c*Tan[e + f*x])/ff], x]] /; FreeQ
[{a, b, c, e, f, n, p}, x] && (IntegersQ[n, p] || IGtQ[p, 0] || EqQ[n^2, 4] || EqQ[n^2, 16])

Rule 377

Int[((a_) + (b_.)*(x_)^(n_))^(p_)/((c_) + (d_.)*(x_)^(n_)), x_Symbol] :> Subst[Int[1/(c - (b*c - a*d)*x^n), x]
, x, x/(a + b*x^n)^(1/n)] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0] && EqQ[n*p + 1, 0] && IntegerQ[n]

Rule 203

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTan[(Rt[b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[b, 2]), x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rubi steps

\begin{align*} \int \frac{1}{\sqrt{a+b \tan ^2(e+f x)}} \, dx &=\frac{\operatorname{Subst}\left (\int \frac{1}{\left (1+x^2\right ) \sqrt{a+b x^2}} \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac{\operatorname{Subst}\left (\int \frac{1}{1-(-a+b) x^2} \, dx,x,\frac{\tan (e+f x)}{\sqrt{a+b \tan ^2(e+f x)}}\right )}{f}\\ &=\frac{\tan ^{-1}\left (\frac{\sqrt{a-b} \tan (e+f x)}{\sqrt{a+b \tan ^2(e+f x)}}\right )}{\sqrt{a-b} f}\\ \end{align*}

Mathematica [A]  time = 0.0679673, size = 46, normalized size = 1. \[ \frac{\tan ^{-1}\left (\frac{\sqrt{a-b} \tan (e+f x)}{\sqrt{a+b \tan ^2(e+f x)}}\right )}{f \sqrt{a-b}} \]

Antiderivative was successfully verified.

[In]

Integrate[1/Sqrt[a + b*Tan[e + f*x]^2],x]

[Out]

ArcTan[(Sqrt[a - b]*Tan[e + f*x])/Sqrt[a + b*Tan[e + f*x]^2]]/(Sqrt[a - b]*f)

________________________________________________________________________________________

Maple [A]  time = 0., size = 67, normalized size = 1.5 \begin{align*}{\frac{1}{f{b}^{2} \left ( a-b \right ) }\sqrt{{b}^{4} \left ( a-b \right ) }\arctan \left ({ \left ( a-b \right ){b}^{2}\tan \left ( fx+e \right ){\frac{1}{\sqrt{{b}^{4} \left ( a-b \right ) }}}{\frac{1}{\sqrt{a+b \left ( \tan \left ( fx+e \right ) \right ) ^{2}}}}} \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(a+b*tan(f*x+e)^2)^(1/2),x)

[Out]

1/f*(b^4*(a-b))^(1/2)/b^2/(a-b)*arctan(b^2*(a-b)/(b^4*(a-b))^(1/2)/(a+b*tan(f*x+e)^2)^(1/2)*tan(f*x+e))

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a+b*tan(f*x+e)^2)^(1/2),x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [A]  time = 1.97741, size = 311, normalized size = 6.76 \begin{align*} \left [-\frac{\sqrt{-a + b} \log \left (-\frac{{\left (a - 2 \, b\right )} \tan \left (f x + e\right )^{2} - 2 \, \sqrt{b \tan \left (f x + e\right )^{2} + a} \sqrt{-a + b} \tan \left (f x + e\right ) - a}{\tan \left (f x + e\right )^{2} + 1}\right )}{2 \,{\left (a - b\right )} f}, \frac{\arctan \left (-\frac{\sqrt{b \tan \left (f x + e\right )^{2} + a}}{\sqrt{a - b} \tan \left (f x + e\right )}\right )}{\sqrt{a - b} f}\right ] \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a+b*tan(f*x+e)^2)^(1/2),x, algorithm="fricas")

[Out]

[-1/2*sqrt(-a + b)*log(-((a - 2*b)*tan(f*x + e)^2 - 2*sqrt(b*tan(f*x + e)^2 + a)*sqrt(-a + b)*tan(f*x + e) - a
)/(tan(f*x + e)^2 + 1))/((a - b)*f), arctan(-sqrt(b*tan(f*x + e)^2 + a)/(sqrt(a - b)*tan(f*x + e)))/(sqrt(a -
b)*f)]

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{1}{\sqrt{a + b \tan ^{2}{\left (e + f x \right )}}}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a+b*tan(f*x+e)**2)**(1/2),x)

[Out]

Integral(1/sqrt(a + b*tan(e + f*x)**2), x)

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{1}{\sqrt{b \tan \left (f x + e\right )^{2} + a}}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a+b*tan(f*x+e)^2)^(1/2),x, algorithm="giac")

[Out]

integrate(1/sqrt(b*tan(f*x + e)^2 + a), x)